// 导入
import request from '../utils/request'
// 封装发送验证码
export const number = (id)=>{
  return  request.get('/sms/codes/' + id)
}
// 获取token
export const login = (data)=>{
  return  request.post('/authorizations',data)
}
// 获取用户频道列表
export const getUserChannel = ()=>{
  return  request.get('/user/channels')
}
// 删除用户频道列表
export const removeUserChannel = (target)=>{
  return  request.delete('user/channels/'+ target)
}
// 全部频道列表
export const getAllUserChannel = ()=>{
  return  request.get('/channels/')
}
// 获取用户自己信息
export const getUserMessage = ()=>{
  return  request.get('/user')
}
// 获取用户个人资料
export const getUserMeans = ()=>{
  return  request.get('/user/profile')
}
// 编辑用户个人资料（包含实名认证）
export const editProfile = data => {
  return request({
    url: '/user/profile',
    data,
    method: 'PATCH'
  })
}